from apps.website.models import SaveFile
from op_drf.serializers import CustomModelSerializer
from rest_framework import serializers
from loguru import logger
# 序列号自动生成规则
# from op_drf.dj_utils import flow_code_manage, check_serial_num


class SaveFileSerializer(CustomModelSerializer):
    """
    文件管理 简单序列化器
    """

    file_url = serializers.CharField(source="file.url", read_only=True)

    class Meta:
        db_table = "yc_save_file"
        model = SaveFile
        fields = "__all__"
